cmake_minimum_required(VERSION 2.8.4)
project(lio_sam)

set(CMAKE_BUILD_TYPE "Release")

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}  -w  -O0 -march=native -g -std=c++11 -fPIC -fpermissive")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w   -O0 -march=native -g -std=c++11 -fPIC -fpermissive")

find_package(OpenCV 3.4 REQUIRED)
find_package(Ceres REQUIRED)

set(BUILD_TYPE "static")

message(STATUS "build target = " ${CMAKE_BUILD_TARGET})
message(STATUS "source dir   = " ${PROJECT_SOURCE_DIR})

include_directories(
		    ${CMAKE_CURRENT_SOURCE_DIR}/modules/publish
		    ${CMAKE_CURRENT_SOURCE_DIR}/third_party/pangolin_viewer
			
		    /usr/include/eigen3
		    /usr/include
)


add_subdirectory(modules/publish)
add_subdirectory(third_party/pangolin_viewer)

add_executable(main apps/main.cpp apps/read_data.cc)
target_link_libraries(main ${OpenCV_LIBS} 
			   publish 
			   pangolin_viewer
)

